# build.spec
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

# 包含资源文件
datas = [
    ("dependency_map.json", "."),
    ("converters/*.py", "converters")
]

a = Analysis(
    ['gui/main.py'],
    pathex=['.'],  # 添加项目根目录
    binaries=[],
    datas=datas,
    hiddenimports=[],
    hookspath=[],
    runtime_hooks=[],
    excludes=[]
)

# 必须先定义 pyz，再在 EXE 中使用
pyz = PYZ(a.pure, a.zipped_data)

exe = EXE(
    pyz,
    a.scripts,
    exclude_binaries=True,
    name='deb_appimage2linglong',
    upx=True,
    console=True,    # 显示控制台
    onefile=True     # 单文件模式
)